package com.weng.cloud.service8881.mock.tao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;

/**
 * @Author: weng
 * @Date: 2022/6/22
 * @Description: com.weng.cloud.service8881.mock.tao
 */
@Service
public class ProcessMockClass {

    @Autowired
    ApplicationContext applicationContext;

    public void process(int a,int b){
        SpyMockClass spyMockClass = applicationContext.getBean("spyMockClass",SpyMockClass.class);
//        SpyMockClass spyMockClass = (SpyMockClass) applicationContext.getBean("spyMockClass");
        int action = spyMockClass.action(1, 2);
        System.err.println(action);
    }
}
